package com.ryoma.service.impl;

import com.ryoma.mapper.development.UrlMapper;
import com.ryoma.model.Url;
import com.ryoma.service.UrlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "urlService")
public class UrlServiceImpl implements UrlService {

    @Autowired
    private UrlMapper urlMapper;

    @Override
    public Url get(String id) {
        return urlMapper.get(id);
    }

    @Override
    public Url get(Url url) {
        return urlMapper.get(url);
    }

    @Override
    public Url getUrl(Url url){
        return urlMapper.getUrl(url);
    }

    @Override
    public List<Url> selectUrlList(Url url) {
        List<Url> urlList = urlMapper.selectUrlList(url);
        return urlList;
    }

    @Override
    public List<Url> selectPOSTUrlList(Url url) {
        List<Url> urlList = urlMapper.selectPOSTUrlList(url);
        return urlList;
    }
}
